<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-model修饰符</title>
</head>

<body>
    <script src="/js/vue.js"></script>  <!-- vue 路径-->
    <div id ="app">
        <!-- 1. lazy修饰符 -->
        <input type="text" v-model.lazy="msg">
        <h2>{{msg}}</h2>

        <!-- 2. number修饰符 -->
        <input type="number" v-model.number="age">
        <h2>{{age}}</h2>

        <!-- 3. trim修饰符 -->
        <input type="text" v-model.trim="name">
        <h2>{{name}}</h2>
    </div>

    <script>
     //创建Vue实例,得到 ViewModel
     let app = new Vue({
        el: '#app',
        data: {
            msg:'hello world',
            age:12,
            name:''
        },
        methods: {}
     });
    </script>
</body>

</html>